/**
 * 
 */
package com.biodiversityatlas.harvest.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * @author timrobertson
 */
public class Datasource {
	protected String url;

	
	public Datasource(String url) {
		super();
		this.url = url;
	}

	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * @param url the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof Datasource)) {
			return false;
		}
		Datasource rhs = (Datasource) object;
		return new EqualsBuilder().appendSuper(super.equals(object)).append(
				this.url, rhs.url).isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(1230673963, 854248843).appendSuper(
				super.hashCode()).append(this.url).toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("url", this.url).toString();
	}
}
